package com.xls.boxlibrary.tixianjilu;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;

import com.xls.boxlibrary.tixianjilu.jifenduihuanjilu.JiFenDuiHuanJiLuFragment;
import com.xls.boxlibrary.tixianjilu.jinbitixianjilu.JinBiTiXianJiLuFragment;

public class FragmenAdapter extends FragmentStateAdapter {
    String appid="";
    public FragmenAdapter(FragmentActivity fragmentActivity,String appid) {
        super(fragmentActivity);
        this.appid=appid;
    }

    @Override
    public Fragment createFragment(int i) {
        if (i==0){
            return JinBiTiXianJiLuFragment.newInstance();
        }
        return JiFenDuiHuanJiLuFragment.newInstance(appid);
    }

    @Override
    public int getItemCount() {
        return 2;
    }
}
